cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(custom_ops)

SET(CMAKE_BUILD_TYPE "Release")
#SET(CMAKE_CXX_COMPILER /data/xianjieyang/bin/gcc11.1/bin/g++)
#SET(CMAKE_C_COMPILER /data/xianjieyang/bin/gcc11.1/bin/gcc)
#set(CMAKE_C_FLAGS "-Wl,--rpath=/data/xianjieyang/bin/glibc2.36/lib" )
#set(CMAKE_C_FLAGS "-Wl,--dynamic-linker=/data/xianjieyang/bin/glibc2.36/lib/ld-linux-x86-64.so.2" )
#find_package(Torch REQUIRED)
add_definitions(-DCURR_VERSION="WalkerS_offline_ASR_1.0.0")

include_directories(
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_SOURCE_DIR}/tensorflow
  ${CMAKE_SOURCE_DIR}/tensorflow/tflite_build/flatbuffers/include
  ${CMAKE_SOURCE_DIR}/front/include
)
link_directories(
    #${CMAKE_SOURCE_DIR}/tensorflow/tflite_build
    #/data/xianjieyang/code/gitee/new_tensorf/tensorflow/tflite_build 
    ${CMAKE_SOURCE_DIR}/tensorlite
    ${CMAKE_SOURCE_DIR}/front
)

set(tts_SRCS
    tts_lib.cpp
    tts_dict.cpp
    )

add_library(sttts SHARED ${tts_SRCS})
target_link_libraries(sttts tensorflowlite front)
#target_link_libraries(sttts tensorflowlite)

add_executable(tts-app tts_app.cpp)
target_link_libraries(tts-app  sttts -lpthread)
set_property(TARGET tts-app PROPERTY CXX_STANDARD 17)
add_executable(tts-batch tts_batch.cpp)
target_link_libraries(tts-batch  sttts -lpthread)
set_property(TARGET tts-batch PROPERTY CXX_STANDARD 17)
